//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - upper
// 1 - lower
//===================================================================================

namespace App.Domain.Handlers {
    using System;
    using App.Data;
    using App.Domain.Contracts;
    using App.Model;

    public class GetCertification {
        private readonly ICertificationRepository _certificationRepository;

        public GetCertification(ICertificationRepository certificationRepository) {
            _certificationRepository = certificationRepository;
        }

        public Certification Execute(Guid certificationId) {
            try {
                return _certificationRepository.GetCertification(certificationId);
            }
            catch (InvalidOperationException ex) {
                throw new BusinessServicesException("UnableToRetrieveReminderExceptionMessage", ex);
            }
        }
    }
}
